import 'package:flutter/cupertino.dart';
import 'package:lib_module_manager/component_manager/component.dart';

abstract class ComponentWidget extends StatefulWidget {
  final Key _componentKey = const ValueKey("component");
  final Expando<Component> _component = Expando("component");
  Component get component => _component[_componentKey]!;

  ComponentWidget({Key? key, required Component component}) : super(key: key) {
    _component[_componentKey] = component;
  }
}
